<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Input Web Page</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <script src="static/js/output.js"></script>
</head>

<body>
    <div class="container text-center mt-4">
        <img src="https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2@1.5x.png" height="150px" width="150px">
        <h1>Wikipedia</h1>
    </div>

    <form action="/display" method="post" class="container mt-4" onsubmit="return validateForm()">
        <div class="form-group">
            <label for="topic">Topic Name:</label>
            <input type="text" class="form-control" name='topic' id="topic" placeholder="Enter Topic" required>
        </div>
        <div class="form-group">
            <label for="language">Select Language:</label>
            <select name="language" id="language" class="form-control" required>
                <option value="Select">Select</option>
                {% for language in languages %}
                <option value="{{ language }}">{{ language }}</option>
                {% endfor %}
            </select>
        </div>
        <input type="submit" value="Submit" class="btn btn-primary">
        <input type="reset" value="Clear" class="btn btn-danger">
    </form>

    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.0.7/dist/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

</body>

</html>
